package com.ts.feign.api;

import com.ts.feign.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "ts-content", path = "/user", contextId = "user")
public interface UserService {

    @GetMapping("/getUserByMobile/{mobile}")
    public UserDTO getUserByMobile(@PathVariable String mobile);

    @PostMapping("/addUser")
    UserDTO addUser(@RequestBody UserDTO userDTO);

    @GetMapping("/getUser/{id}")
    UserDTO getUser(Long id);
}
